package io.xiyou.account.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.xiyou.account.dao.model.LocalConfirmLog;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;

@Repository
public interface LocalConfirmLogMapper extends BaseMapper<LocalConfirmLog> {

    /**
     * 查询分支事务confirm是否已执行
     *
     * @param localTradeNo 本地事务编号
     * @return
     */
    int isExistConfirm(String localTradeNo);

    @Insert("insert into local_confirm_log values(#{txNo},now());")
    int addConfirm(String localTradeNo);

}